<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <my-component1></my-component1>
</div>
<template id="myComponent">
    <div>This is a component!</div>
</template>
</body>
<script src="../js/vue.1.0.24.js"></script>
<script>
    // 全局注册，my-component1是标签名称
    Vue.component('my-component1',{
        template: '#myComponent'
    })

    new Vue({
        el:'#app'
    })
</script>
</html>